<template>
  <div>
    <a-card :bordered='false'>

      <f-search-form :more='true' @searchHandler='searchHandler'>
        <f-search-form-item label='单位'  name='customId' type='select' :data='api.custom.list' valueKey='customId' label-key='customName' />

        <!--        <f-search-form-item label='部门' ref='dept' name='deptId' type='select' :data='api.hyorder.deptList' valueKey='deptId' label-key='deptName' style='width: 220px' /> -->
        <f-search-form-item label='类型' name='amountType' type='select'  :data='api.bal.amountType' valueKey='value' label-key='label'  />
        <f-search-form-item label='开始日期' type='date' name='beginDate'  />
        <f-search-form-item label='结束日期' type='date' name='endDate'  />
      </f-search-form>

      <f-table ref='table' rowKey='logId' :columns='columns' :multiple='false' :operator='operator'
               :params='queryParam' :api='api.bal' handler=''>
         <span slot='amountType' slot-scope='text, record, index'>
          <div v-if="text=='1'">收押金</div>
          <div v-if="text=='2'">退押金</div>
          <div v-if="text=='3'">保证金</div>
        </span>
        <span slot='checkState' slot-scope='text, record, index'>
            <a-tag color='pink' v-if='text==0'>未提交</a-tag>
            <a-tag color='#87d068' v-if='text==1' @click='processImg(record)'>{{ record.taskName }}</a-tag>
            <a-tag color='#f50' v-if='text==2'>已审批</a-tag>
        </span>

      </f-table>
     </a-card>
    </div>
</template>
<script>
import api from "../js/api"

export default {
  name: "ExpenseList",
  components: {
  },
  data() {
    let me = this
    //操作按钮
    let operator = []


    return {
      api: Object.assign(api, this.api),
      processImageVisible: false,
      //列表初始化查询参数
      queryParam: {},
      // 表头
      columns: [
        {
          title: "序号",
          width: "60",
          align: "center",
          customRender: (text, record, index) => index + 1
        },
        {
          title: "收款单位",
          align: "center",
          width: "100",
          dataIndex: "customName"
        },
        {
          title: "金额",
          align: "center",
          dataIndex: "amount"
        },
        {
          title: "日期",
          align: "center",
          dataIndex: "bizDate"
        },
        {
          title: "类型",
          align: "center",
          dataIndex: "amountType",
          scopedSlots: { customRender: "amountType" }
        }
      ],
      operator: operator
    }
  },
  created() {
  },
  methods: {

  }
}
</script>
